package gxmzu.gxmzuproject.service.impl;

import gxmzu.gxmzuproject.entity.MiniGroupChat;
import gxmzu.gxmzuproject.mapper.MiniGroupChatMapper;
import gxmzu.gxmzuproject.service.MiniGroupChatService;
import gxmzu.gxmzuproject.param.MiniGroupChatQueryParam;
import gxmzu.gxmzuproject.vo.MiniGroupChatQueryVo;
import gxmzu.gxmzuproject.config.common.BaseServiceImpl;
import gxmzu.gxmzuproject.config.common.Paging;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.io.Serializable;


/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Code534
 * @since 2022-08-11
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class MiniGroupChatServiceImpl extends BaseServiceImpl<MiniGroupChatMapper, MiniGroupChat> implements MiniGroupChatService {

    @Resource
    private MiniGroupChatMapper miniGroupChatMapper;

    @Override
    public MiniGroupChatQueryVo getMiniGroupChatById(Serializable id) {
        return miniGroupChatMapper.getMiniGroupChatById(id);
    }

    @Override
    public Paging<MiniGroupChatQueryVo> getMiniGroupChatPageList(MiniGroupChatQueryParam param) {
        IPage<MiniGroupChatQueryVo> iPage = miniGroupChatMapper.getMiniGroupChatPageList(getPage(param),param);
        return new Paging<>(iPage);
    }

}
